/**
 * 							Interrupt Common Defination
 * @brief	Interrupt Common Definaton
 * @author	chy.
 * @note
 * @comment
 */
#ifndef _K_INT_INTERRUPT_C_
#define _K_INT_INTERRUPT_C_

#include "interrupt.h"
#include "interrupt_s3c2440a.h"

/*************************************************************************
 * 							ASSUME	COMMENTS
 * 		assume that: system need 3 timers at least.One is used to os
 * task schedule;One is used to software running in system.And the other
 * is used to DMA controling.
 * 		we assume here that: time0 are always used to support system task
 * schedule!
 *************************************************************************/

/**
 * @BRIEF	:	IRQ interrupt handler
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	this is the main IRQ interrupt handler
 */
void k_int_irq_handler(void)
{
	// first read the interrupt type
	unsigned int type;
	type = k_int_get_cur_irq_type();

	switch(type)
	{
		case INT_ADC:	// ADC EOC and Touch interrupt (INT_ADC_S/INT_TC) ARB5
		{

		}
		break;
		case INT_RTC:  	// RTC alarm interrupt                            ARB5
		{

		}
		break;
		case INT_SPI1:  // SPI1 interrupt                                 ARB5
		{

		}
		break;
		case INT_UART0:	// UART0 Interrupt (ERR, RXD, and TXD)            ARB5
		{

		}
		break;
		case INT_IIC:	// IIC interrupt                                  ARB4
		{

		}
		break;
		case INT_USBH:	// USB Host interrupt                             ARB4
		{

		}
		break;
		case INT_USBD:	// USB Device interrupt                           ARB4
		{

		}
		break;
		case INT_NFCON:	// Nand Flash Control Interrupt                   ARB4
		{

		}
		break;
		case INT_UART1: // UART1 Interrupt (ERR, RXD, and TXD)            ARB4
		{

		}
		break;
		case INT_SPI0:	// SPI0 interrupt                                 ARB4
		{

		}
		break;
		case INT_SDI:	// SDI interrupt                                  ARB3
		{

		}
		break;
		case INT_DMA3:  // DMA channel 3 interrupt                        ARB3
		{

		}
		break;
		case INT_DMA2:  // DMA channel 2 interrupt                        ARB3
		{

		}
		break;
		case INT_DMA1:	// DMA channel 1 interrupt                        ARB3
		{

		}
		break;
		case INT_DMA0:	// DMA channel 0 interrupt                        ARB3
		{

		}
		break;
		case INT_LCD:	// LCD interrupt (INT_FrSyn and INT_FiCnt)        ARB3
		{

		}
		break;
		case INT_UART2: // Interrupt (ERR, RXD, and TXD) UART2            ARB2
		{

		}
		break;
		case INT_TIMER4:// Timer4 interrupt                               ARB2
		{

		}
		break;
		case INT_TIMER3:// Timer3 interrupt                               ARB2
		{

		}
		break;
		case INT_TIMER2:// Timer2 interrupt                               ARB2
		{

		}
		break;
		case INT_TIMER1:// Timer1 interrupt                               ARB2
		{

		}
		break;
		case INT_TIMER0:// Timer0 interrupt                               ARB2
		{

		}
		break;
		case INT_WDT_AC97:  // Watch-Dog timer interrupt(INT_WDT, INT_AC97)   ARB1
		{

		}
		break;
		case INT_TICK: 		// RTC Time tick interrupt                        ARB1
		{

		}
		break;
		case nBATT_FLT:   	// Battery Fault interrupt                        ARB1
		{

		}
		break;
		case INT_CAM:		// Camera Interface (INT_CAM_C, INT_CAM_P)        ARB1
		{

		}
		break;
		case EINT8_23: 		// External interrupt 8 – 23                      ARB1
		{

		}
		break;
		case EINT4_7:		// External interrupt 4 – 7                       ARB1
		{

		}
		break;
		case EINT3:			// External interrupt 3                           ARB0
		{

		}
		break;
		case EINT2:			// External interrupt 2                           ARB0
		{

		}
		break;
		case EINT1:			// External interrupt 1                           ARB0
		{

		}
		break;
		case EINT0:			// External interrupt 0                           ARB0
		{

		}
		break;
		case INT_AC97:     	// AC97 interrupt                                 INT_WDT_AC97
		{
			
		}
		break;
		case INT_WDT:     	// Watchdog interrupt                             INT_WDT_AC97
		{
			
		}
		break;
		case INT_CAM_P:     // P-port capture interrupt in camera interface   INT_CAM
		{
			
		}
		break;
		case INT_CAM_C:    	// C-port capture interrupt in camera interface   INT_CAM
		{
			
		}
		break;
		case INT_ADC_S:    	// ADC interrupt                                  INT_ADC
		{
			
		}
		break;
		case INT_TC:       	// Touch screen interrupt (pen up/down)           INT_ADC
		{
			
		}
		break;
		case INT_ERR2:      	// UART2 error interrupt                          INT_UART2
		{
			
		}
		break;
		case INT_TXD2:    	// UART2 transmit interrupt                       INT_UART2
		{
			
		}
		break;
		case INT_RXD2:     	// UART2 receive interrupt                        INT_UART2
		{
			
		}
		break;
		case INT_ERR1:     	// UART1 error interrupt                          INT_UART1
		{
			
		}
		break;
		case INT_TXD1:     	// UART1 transmit interrupt                       INT_UART1
		{
			
		}
		break;
		case INT_RXD1:     	// UART1 receive interrupt                        INT_UART1
		{
			
		}
		break;
		case INT_ERR0:     	// UART0 error interrupt                          INT_UART0
		{
			
		}
		break;
		case INT_TXD0:     	// UART0 transmit interrupt                       INT_UART0
		{
			
		}
		break;
		case INT_RXD0:    	// UART0 receive interrupt                        INT_UART0
		{
			
		}
		break;
		default:
		// there must be some errors!
		return;
	}
}

/**
 * @BRIEF	:	FIQ interrupt handler
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	this is the main FIQ interrupt handler
 */
void k_int_fiq_handler(void)
{

}

/**
 * @BRIEF	:	PABT interrupt handler
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	this is the main PABT interrupt handler
 */
void k_int_pabt_handler(void)
{

}

/**
 * @BRIEF	:	DABT interrupt handler
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	this is the main DABT interrupt handler
 */
void k_int_dabt_handler(void)
{

}

/**
 * @BRIEF	:	UND interrupt handler
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	this is the main UND interrupt handler
 */
void k_int_und_handler(void)
{

}

/**
 * @BRIEF	:	SWI(SVC) interrupt handler
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	this is the main SWI(SVC) interrupt handler
 */
void k_int_svc_handler(void)
{

}

/**
 * @BRIEF	:	Reserved interrupt handler
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	this is the main Reserved interrupt handler
 */
void k_int_revserve_handler(void)
{

}

/**
 * @BRIEF	:	Reset interrupt handler
 * @PARAM	:	void
 * @RETURN	:	void
 * @NOTE	:	this is the main Reset interrupt handler
 */
void k_int_reset_handler(void)
{

}

#endif /* _K_INT_INTERRUPT_C_ */